package com.yc.yyds.util;

import com.google.gson.Gson;
import com.yc.yyds.Bean.Result;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class ToJsonUtil {
    public static void toJson(HttpServletResponse response , Result result) throws IOException {
        String json = new Gson().toJson(result);
        response.getWriter().append(json);
    }
}
